<template>
  <div>
    <h2>子组件</h2>
    <div>{{ value }}</div>
    <pre>
      parent-beforeCreate====
      parent-created====
      parent-beforeMount====
      child-beforeCreate====
      child-created====
      child-beforeMount====
      child-mounted====
      parent-mounted====

      parent-beforeDestroy====
      child-beforeDestroy====
      child-destroyed====
      parent-destroyed====
    </pre>
  </div>
</template>

<script>
export default {
  name: 'B',
  props: {
    value: {
      type: String,
      default: ''
    }
  },
  beforeCreate() {
    console.log('child-beforeCreate====');
  },
  created() {
    console.log('child-created====');
  },
  beforeMount() {
    console.log('child-beforeMount====');
  },
  mounted() {
    console.log('child-mounted====');
  },
  beforeUpdate() {
    console.log('child-beforeUpdate====');
  },
  updated() {
    console.log('child-updated====');
  },
  beforeDestroy() {
    console.log('child-beforeDestroy====');
  },
  destroyed() {
    console.log('child-destroyed====');
  }
};
</script>

<style scoped></style>
